package com.smarthealthring.mm.api;

import com.smarthealthring.mm.bean.BaseResponse;
import com.smarthealthring.mm.bean.GetVerifyRes;
import com.smarthealthring.mm.bean.HrDetailRes;
import com.smarthealthring.mm.bean.LoginRes;
import com.smarthealthring.mm.bean.ModifyPwdRes;
import com.smarthealthring.mm.bean.RegistRes;
import com.smarthealthring.mm.bean.SleepDetailRes;
import com.smarthealthring.mm.bean.StepDetailRes;
import com.smarthealthring.mm.bean.SyncDataRes;
import com.smarthealthring.mm.bean.UpdateInfoRes;
import com.smarthealthring.mm.bean.WechatLoginRes;

import java.util.Map;

import io.reactivex.Flowable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;


/**
 * Created by hewei26 on 2016/9/28.
 */

public interface ApiService {

    //发送短信获取验证码
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<GetVerifyRes>> getVerifyCode(@FieldMap Map<String, String> params);

    //通过验证码注册
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<RegistRes>> regist(@FieldMap Map<String, String> params);

    //登录
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<LoginRes>> login(@FieldMap Map<String, String> params);

    //修改密码
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<ModifyPwdRes>> modifyPwd(@FieldMap Map<String, String> params);

    //更新个人信息
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<UpdateInfoRes>> updateInfo(@FieldMap Map<String, String> params);

    //同步数据
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<SyncDataRes>> syncData(@FieldMap Map<String, String> params);

    //微信登录
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<Object>> wechatLogin(@FieldMap Map<String, String> params);

    //退出登录
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<Object>> unlogin(@FieldMap Map<String, String> params);

    //步数详情
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<StepDetailRes>> stepDetail(@FieldMap Map<String, String> params);

    //心率详情
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<HrDetailRes>> hrDetail(@FieldMap Map<String, String> params);

    //睡眠详情
    @FormUrlEncoded
    @POST("interface4mobilefront")
    Flowable<BaseResponse<SleepDetailRes>> sleepDetail(@FieldMap Map<String, String> params);

//    @GET("access_token")
//    Flowable<WechatLoginRes> wechatLogin(@QueryMap Map<String, String> params);
//
//    @GET("access_token")
//    Flowable<Object> wechatUserInfo(@QueryMap Map<String, String> params);

}
